package com.example.demo.dto;

import lombok.Data;

@Data
public class PageRequest<T> {
    private int pageSize;
    private int pageNo;
    private T condition;

    public int getPageSize(){
        int p = this.pageSize;
        if (p>100 || p<0) {
            return 100;
        }
        return p;
    }
    public int getPageNo(){
        if (pageNo> 1000) {
            return 1;
        }
        return pageNo;
    }
}
